import httpAxios from '../utils/httpAxios'
// import { ResponceTypeData, MenuTienData } from '../types/index'

// 登录
export const login = (data: object) => {
    return httpAxios.post('/login', data)
}

// 获取验证码的接口
export const getcaptcha = () => {
    return httpAxios.get('/getcaptcha')
}

// 注册
export const register = (data: object) => {
    return httpAxios.post('/register', data)
}

// 获取菜单
export const getmenu = () => {
    return httpAxios.get('/getmenu')
}

// 新增菜单
export const addmenu = (data: object) => {
    return httpAxios.post('/addmenu', data)
}

// 修改菜单
export const editmenu = (data: object) => {
    return httpAxios.post('/editmenu', data)
}

// 删除菜单
export const delmenu = (id: number) => {
    return httpAxios.post('/delmenu', { id })
}